package com.googlecode.economini.converter;

public class Token<T extends Enum<?>> {

    private final String value;
    private final T type;

    public Token(String value, T type) {
        this.value = value;
        this.type = type;
    }

    public String getValue() {
        return value;
    }

    public T getType() {
        return type;
    }

    @Override
    public String toString() {
        return String.format("[%s] %s", type.name(), value);
    }
}
